<template>
  <div>
    <el-dialog title="查看人员" :visible.sync="dialogVisible" width="900px">
      <el-table :data="list" height="500" border style="width: 100%">
        <el-table-column prop="userName" label="用户名称"></el-table-column>

        <el-table-column prop="loginName" label="登录名称"></el-table-column>

        <el-table-column prop="roleName" label="角色"></el-table-column>
      </el-table>
    </el-dialog>
  </div>
</template>

<script>
import apiRole from "@/api/baseManager/role";
export default {
  name: "dialogSeePeople",
  data() {
    return {
      dialogVisible: false,
      list: [],
      roleId: ""
    };
  },

  methods: {
    getList(row) {
      apiRole.getListUserBy(row).then(res => {
        this.list = res.data.list;
        //遍历角色名字
        this.list.forEach(item => {
        item.roleName = row.roleName;
      });
      });
    },
    //查看
    openSee(row) {
      this.getList(row);
      this.dialogVisible = true;
    }
  }
};
</script>

<style scoped>
</style>